gboolean wide_separators;
gint separator_height;
+ gtk_style_context_save (context);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
+
gtk_widget_style_get (widget,
"wide-separators", &wide_separators,
"separator-height", &separator_height,
if (nat_height % 2 == 0)
nat_height += 1;
}
+
+ gtk_style_context_restore (context);
}
accel_width = 0;
gboolean wide_separators;
gint separator_height;
+ gtk_style_context_save (context);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
+
gtk_widget_style_get (widget,
"wide-separators", &wide_separators,
"separator-height", &separator_height,
y + padding.top,
x + w - padding.right - 1,
y + padding.top);
+
+ gtk_style_context_restore (context);
}
GTK_WIDGET_CLASS (gtk_menu_item_parent_class)->draw (widget, cr);
static void
gtk_separator_menu_item_init (GtkSeparatorMenuItem *item)
{
- GtkStyleContext *context;
-
- context = gtk_widget_get_style_context (GTK_WIDGET (item));
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
}
/**